home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Windows Selection / Windows Selection 1.iso / Graphics / Formula Graphics Multimedia System / SPRITES.SXT < prev    next >
Encoding:
Text File  |  1996-03-18  |  787 b   |  31 lines

  1. //////////////////////////
  2. // Harrow Software 1996
  3. // Sprite examples
  4.  
  5. ///////////////////////////
  6. // (1) - Displaying a sprite
  7.  
  8. // Firstly the bitmap(s) for the sprite must be loaded. Sprites
  9. //  are drawn without palette remapping so we will need to remap
  10. //  the bitmap to the system palette
  11.  
  12. load "sprite.gif" bitmap my_bitmap
  13. remap bitmap my_bitmap
  14.  
  15. // Next a sprite variable needs to be created
  16.  
  17. my_sprite = new sprite
  18.  
  19. // Then the bitmap can be assigned to the sprite at some location
  20. //  on the screen. This instruction only prepares the sprite.
  21.  
  22. sprite my_sprite bitmap my_bitmap at 0,0
  23.  
  24. // This instruction draws the sprite. If there were more than one
  25. //  sprite then they would all be drawn at once.
  26.  
  27. update sprites
  28.  
  29. //////////////////////////
  30.  
  31.